import cv2 #opencv读取的格式是BGR
import matplotlib.pyplot as plt
import numpy as np 

img_path = "/Users/mac/Documents/Learning/LearningOpencv/datasets/1.jpg"
img2_path = "/Users/mac/Documents/Learning/LearningOpencv/datasets/2.jpg"
save_path = "/Users/mac/Documents/Learning/LearningOpencv/datasets/1_test.jpg"

img1 = cv2.imread(img_path)
img2 = cv2.imread(img2_path)
# print(img.shape)


img1= cv2.resize(img1, (500, 414))
print(img1.shape)                      # (414, 500, 3)
img2 = cv2.resize(img2, (500, 414))

res = cv2.addWeighted(img2, 0.4, img1, 0.6, 0)
cv2.imshow("res", res)
cv2.waitKey(0)
# plt.imshow(res)
